# Adapt $SCRIPT and $WAR value if the servlex-appengine script and/or
# the Servlex WAR file are located somewhere else...

# Don't forget to adapt xproject/appengine-web.xml to use your own
# application ID (hopefully, you won't have the right to deploy on
# fgeorges :-p).

# the script to build a GAE webapp from Servlex
SCRIPT=../../../../expath/servlex/bin/servlex-appengine.sh
# the Servlex WAR file
WAR=../../../../expath/servlex/servlex/dist/servlex.war
# the GAE Tools package
LIB=../../gae-tools/dist/gae-tools-0.0.1.xar

deploy:
	# remove any previous build
	rm -rf dist/servlex-appengine-war/
	# build the webapp (package it as a XAW)
	xproj build
	# build the GAE exploded WAR
	sh $(SCRIPT) --servlex $(WAR) dist/sample-datastore-0.1.0.xaw $(LIB)
	# actually upload it to appspot
	appenginecfg update dist/servlex-appengine-war/
